# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-geocoder
pkgver=1.38.1
pkgrel=2
pkgdesc="A simple and consistent geocoding library"
url="https://github.com/DenisCarriere/geocoder"
arch="noarch"
license="MIT"
depends="python3 py3-requests py3-ratelim py3-click"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-requests-mock"
source="https://pypi.python.org/packages/source/g/geocoder/geocoder-$pkgver.tar.gz"
options="!check" # Requires both an API key and test files which are not present in the tarball
builddir="$srcdir/geocoder-$pkgver"

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="e6308b3a918fe2d61bbaa3ad0b0aa2039757a78146acb497fd98e57d4315541dd56a76b482d22823b314e8a093ab8b6759d7aadb6a9c8ab3ee39473e36b218cb  geocoder-1.38.1.tar.gz"
